package cn.kgc.controller;


import cn.kgc.pojo.Company;
import cn.kgc.service.CompanyService;
import com.alibaba.dubbo.config.annotation.Reference;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class CompanyController {
    @Reference
    private CompanyService companyService;

    @RequestMapping("/findByCompanyId.json")
    public Company findById(Integer companyId){
        return companyService.findById(companyId);
    }

    @RequestMapping("/qureyCompanyByCompanyName.json")
    public Company qureyCompanyByCompanyName(String companyName){
        return companyService.getCompanyByCompanyName(companyName);
    }

}
